package retrofit.boot.constants;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * Created by wulg on 2019/11/5
 * description:
 */
public final class RetrofitOrder {

    private static int DEFAULT_RETROFIT_ORDER = 10000;

    private static AtomicInteger ENDPOINT = new AtomicInteger(DEFAULT_RETROFIT_ORDER);


    private static AtomicInteger CLIENT = new AtomicInteger(DEFAULT_RETROFIT_ORDER);

    public static int getEndpointOrder(){
        return ENDPOINT.decrementAndGet();
    }

    public static int getClientOrder(){
        return CLIENT.getAndIncrement();
    }
}
